import { http } from '@/utils/request'
import type { loginData, userInfo } from '@/api/types'

export const reqLogin = (username: string, password: string) => {
  return http<loginData>('/admin/acl/index/login', 'POST', {
    username,
    password
  })
}

export const reqUserInfo = () => {
  return http<userInfo>('/admin/acl/index/info', 'GET')
}

export const reqLogOut = () => {
  return http('/admin/acl/index/logout', 'POST')
}
